package cn.dansj.common.utils.lock;

import java.io.Closeable;

public interface Lock extends Closeable {
    /**
     * 加锁
     */
    boolean lock() throws LockException;

    /**
     * 释放锁
     */
    boolean unlock();

    @Override
    default void close() {
        unlock();
    }
}
